<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/base.jsp"%>
<%

ChronicdisDao cdao=new ChronicdisDao();
List<Chronicdis> clist=cdao.findAll();

%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<base href="<%=basePath%>">

<title>慢性病报销登记</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/admin.css">
<script src="js/jquery-1.4.4.min.js"></script>
<script src="js/admin.js"></script>
</head>
<body>
	<form method="post" action="" id="listform">
		<div class="panel admin-panel">
			<div class="panel-head">
				<strong class="icon-reorder">慢性病报销登记</strong>
			</div>
			<div class="padding border-bottom">
				<ul class="search" style="padding-left:10px;">
					<li>慢性病报销：</li>
					<li><input type="text" placeholder="请输入身份证号码" name="idcard"
						class="input"
						style="width:250px; line-height:17px;display:inline-block" /> <a
						href="javascript:void(0)" class="button border-main icon-search"
						onclick="changesearch();"> 提交</a></li>
					<li style="float:right;"><a href="javascript:void(0)" class="button border-main" style="height: 36px;"
						onclick="list();"> 慢性病报销登记表</a></li>
				</ul>
			</div>
			
			<div style="text-align: center;font-size: 20px; font-weight: 800;margin-top: 10px;margin-bottom: 10px;">慢性病报销信息</div>
			<table class="table table-hover text-center">
			<!-- 遍历循环后台传来的数据 -->
            <c:forEach items="${model}" var="model">
            
						<input type="hidden" name="membercode" value="${model.membercode}"></input>
				<tr>
					<td style="background-color: #f2f9fd;">姓名</td>
						<td>${model.name}</td>
					<td style="background-color: #f2f9fd;">性别</td>
						<td>${model.sex}</td>
				</tr>
				<tr>
					<td style="background-color: #f2f9fd;">农合证号</td>
						<td>${model.cmscode}</td>
					<td style="background-color: #f2f9fd;">电话</td>
						<td>${model.phone}</td>
				</tr>
				<tr>
					<td style="background-color: #f2f9fd;">家庭编号</td>
						<td>${model.familycode}</td>
					<td style="background-color: #f2f9fd;">身份证号</td>
						<td>${model.idcard}</td>
				</tr>	
				</c:forEach> 
				
				<tr>
					<td style="background-color: #f2f9fd;">
						<div class="label">
							<label>疾病名称：</label>
						</div>
					</td>
					<td><div class="field" style="margin:0 auto;display: inline-block">
						<select id="illcode" name="illcode" class="input w50" style="width: 300px;">
							<%
						  for(Chronicdis m:clist){ 
						
						  %>
							<option value="<%=m.getIllcode()%>">
											<%=m.getIllname()%></option>
							<%} %>

						</select>
						<div class="tips"></div>
						</div>
					</td>
					<td style="background-color: #f2f9fd;">
						<div class="label">
							<label>医疗总费用：</label>
						</div>
					</td>
					<td><div class="field" style="margin:0 auto;display: inline-block">
						<input type="text" class="input w50" style="width: 300px;" value="" name="allcost" id="allcost" placeholder="请输入医疗总费用" />
						<div class="tips"></div>
						</div>
					</td>
				</tr>	
				<tr>
					<td style="background-color: #f2f9fd;">
						<div class="label">
							<label>医院发票号：</label>
						</div>
					</td>
					<td><div class="field" style="margin:0 auto;display: inline-block">
						<input type="text" class="input w50" style="width: 300px;" value="" name="hosinvoice" id="hosinvoice" placeholder="请输入医院发票号" />
						<div class="tips"></div>
						</div>
					</td>
					<td style="background-color: #f2f9fd;">
						<div class="label">
							<label>就诊时间：</label>
						</div>
					</td>
					<td><div class="field" style="margin:0 auto;display: inline-block">
						<input type="text" class="input w50" style="width: 300px;" value="" name="seetime" id="seetime" placeholder="2019-2-5" />
						<div class="tips"></div>
						</div>
					</td>
				</tr>
				<tr>
					<td style="background-color: #f2f9fd;">
						<div class="label">
							<label>报销金额：</label>
						</div>
					</td>
					<td><div class="field" style="margin:0 auto;display: inline-block">
						<input type="text" class="input w50" style="width: 230px;" value="" name="applymoney" id="applymoney"  />
						<a class="button border-main" style="height: 40px;margin-left: 10px;text-align: center;" onclick="applymoney()">计算</a>
						<div class="tips"></div>
						</div>
					</td>
				</tr>
			</table>
		</div>
		<div align="center" style="margin-top: 15px;"><button class="button bg-main " onclick="add()">
									<span class="icon-check-square-o"></span> 确认信息</button> </div>
	</form>
<script type="text/javascript">
function changesearch(){
	var url = "<%=path%>/system/FamilyMemberServlet?m=findByIdCard";
	// 替换form表单需要提交的url
	$('#listform').attr('action',url);
	// 提交form表单
	$('#listform').submit();
}
function list(){
	var url = "<%=path%>/system/ApplyServlet?m=list";
	// 替换form表单需要提交的url
	$('#listform').attr('action',url);
	// 提交form表单
	$('#listform').submit();
}
function applymoney(){
	 $("#applymoney").val("2500");
}
function add(){
	var url = "<%=path%>/system/ApplyServlet?m=add";
	// 替换form表单需要提交的url
	$('#listform').attr('action',url);
	// 提交form表单
	$('#listform').submit();
}
</script>
</body>
</html>
